//This file is added by lcl at 2012-09-30
package com.shengyin.ec.service.alliance;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.shengyin.ec.model.dao.alliance.AllianceViewerInfoDao;
import com.shengyin.ec.model.entity.AllianceViewerInfo;

@Service("allianceViewInfoService")
public class AllianceViewInfoServiceImpl implements AllianceViewInfoService {
	
	@Autowired
	AllianceViewerInfoDao allianceViewerInfoDao;
	
	public boolean checkAllianceViewer(String username, String password){
		return allianceViewerInfoDao.checkAllianceViewer(username, password);
	}
	
	public AllianceViewerInfo getAllianceViewerByAllianceViewerId(long id){
		return allianceViewerInfoDao.getAllianceViewerByAllianceViewerId(id);
	}
	
	
	public List<AllianceViewerInfo> getAllianceViewerListByAllianceCompanyId(long id){
		return allianceViewerInfoDao.getAllianceViewerListByAllianceCompanyId(id);
	}
	
	public void addAllianceViewerByAllianceViewerId(AllianceViewerInfo allianceViewerInfo){
		
	}
	
	public void createAllianceViewInfo(AllianceViewerInfo allianceViewerInfo){
		allianceViewerInfoDao.save(allianceViewerInfo);
	}
	
	public int getAllianceViewType(String username){
		return allianceViewerInfoDao.getAllianceViewType(username);
	}
	
	public AllianceViewerInfo getAllianceViewerByName(String name){
		return allianceViewerInfoDao.getAllianceViewerByName(name);
	}
}